﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php

using System.ComponentModel.DataAnnotations;

namespace DNA.Mvc
{
    /// <summary>
    /// The Subscription data object.
    /// </summary>
    [Table("dna_Subscriptions")]
    public class Subscription
    {
        [Key]
        [Column("ID", Order = 1)]
        public int ID { get; set; }

        /// <summary>
        /// Gets/Sets the token key in hash code format.
        /// </summary>
        [Required]
        public int HashKey { get; set; }
        
        /// <summary>
        /// Gets/Sets the token key of the subscription.
        /// </summary>
        [Required,StringLength(2048)]
        public string Token { get; set; }

        /// <summary>
        /// Gets/Sets the subscription user name.
        /// </summary>
        [Required,StringLength(50)]
        public string UserName { get; set; }
    }
}
